import { salesOrderFlowTypeList } from '@/enums/orderEnum';
import { BasicColumn, FormSchema } from '@/components/Table';

export const tableColumns: BasicColumn[] = [
  { title: '订单号', dataIndex: 'orderCode' },
  { title: '支付时间', dataIndex: 'paidTime' },
  { title: '交易手机号', dataIndex: 'orderPlacerUserPhone' },
  { title: '交易金额（元）', dataIndex: 'paidAmount' },
  {
    title: '交易类型',
    dataIndex: 'type',
    customRender: ({ text }) => {
      return salesOrderFlowTypeList.find((find) => find.value === text)?.label;
    },
  },
];
export const tableFormSchema: FormSchema[] = [
  {
    field: 'orderCode',
    label: '订单号',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    field: 'orderPlacerUserPhone',
    label: '交易手机号',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    field: 'paidTime',
    label: '支付时间',
    component: 'RangePicker',
    colProps: { span: 6 },
  },
];

export const abstractList = [
  { label: '交易流水（笔）', key: 'flowNum' },
  { label: '交易用户', key: 'customerNum' },
  { label: '实收总金额（元）', key: 'paidAmount' },
];
